import os
if not os.path.exists('./logs'):
    os.mkdir('./logs')


import logging

LOG = {
    "level": "INFO",
    "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s",
    "datefmt": "%Y-%m-%d %H:%M:%S",
}

logging.basicConfig(
    level=LOG["level"], 
    format=LOG["format"],
    datefmt=LOG["datefmt"],
    filename='./logs/server.log',
    filemode='a',
    encoding='utf-8'
)